package com.cff.service.dubbo;

import java.util.List;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.alibaba.dubbo.config.annotation.Reference;
import com.cff.domain.UserTask;

@Component
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring-dubbo.xml")
public class DubboService {
	
	@Autowired
    private SuggestDubboService suggestDubboService;
	
	public SuggestDubboService getSuggestDubboService() {
		return suggestDubboService;
	}

	public void setSuggestDubboService(SuggestDubboService suggestDubboService) {
		this.suggestDubboService = suggestDubboService;
	}

	public String getTask(String userId){
		List<UserTask> tasks = suggestDubboService.getUserTask(userId);
		return tasks.toString();
	}
	
	@Test
	public void Test(){
		String result = getTask("15607110725");
		System.out.println(result);
	}
 
}
